{
  //number[]:代表当前的类型是数组,并且数组中的值的类型是number
  const arr1: number[] = [1, 2, 3, 4];
  arr1.push(2);

  //(number | string)[]:当前是一个数组,数组的类型可能是number也可能是string
  const arr2: (number | string)[] = ["1", 2, "3", 4];
  arr2.push(3)
  arr2.push("3")


  //使用泛型定义数组类型
  const arr4: Array<number> = [1, 2, 3, 4];

}